package com.qhit.service.impl;

import com.qhit.dao.RoleMappper;
import com.qhit.pojo.Role;
import com.qhit.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleMappper roleMapper;
    @Override
    public List<Role> getList(HashMap hashMap) {
        return roleMapper.getList(hashMap);

    }

    @Override
    public List<Role> getList2() {
        return roleMapper.getList2();
    }

    @Override
    public Long getListCount(HashMap hashMap) {
        return roleMapper.getListCount(hashMap);
    }

    @Override
    public int add(Role Role) {
        return roleMapper.add(Role);
    }

    @Override
    public Role getRoleById(Integer id) {
        return roleMapper.getRoleById(id);
    }

    @Override
    public int edit(Role Role) {
        return roleMapper.edit(Role);
    }

    @Override
    public int delete(Integer id) {
        return roleMapper.delete(id);
    }

    @Override
    public List<Role> getRolesByUserId(int id) {
        return roleMapper.getRolesByUserId(id);
    }


}
